<?php

/*---------------------------------------------------------------------------
 * Please, don't touch this file.
 *
 * If you need to custom this Class, you can edit client.php
 * file overwrite and define new methods
 *---------------------------------------------------------------------------
 */

/**
 * 
 *
 * @Authors Gonzalez Federico, Viera Leonel 
 * @package mailing
 * @subpackage model
 *
 * 
 */
class Client_protoweb extends Protoweb_models {
  public $table      = "clients";
  public $model      = "client";
  public $has_many   = array('template', 'from', 'campaign', 'permission', 'recipient', 'catalog', 'attribute');
  public $has_one    = array('service');
  public $validation = array(
    'name' => array(
      'label' => 'Name',
      'rules' => array('trim', 'required')      
    ),
    'country' => array(
      'label' => 'Country',
      'rules' => array('trim', 'required')
          
    ),
    'state' => array(
      'label' => 'State',
      'rules' => array('trim', 'required')
          
    ),
    'location' => array(
      'label' => 'Location',
      'rules' => array('trim', 'required')
          
    ),
    'zipcode' => array(
      'label' => 'Zip Code',
      'rules' => array('trim', 'required')
          
    ),
    'address' => array(
      'label' => 'Postal Address',
      'rules' => array('trim', 'required')
          
    ),
    'lat' => array(
      'label' => 'Latitude',
      'rules' => array()
          
    ),
    'lng' => array(
      'label' => 'Longitude',
      'rules' => array()
          
    ),
    'email' => array(
      'label' => 'Email',
      'rules' => array('trim', 'valid_email')
          
    ),
    'phone' => array(
      'label' => 'Phone(s)',
      'rules' => array('trim')
          
    ),
    'slug' => array(
      'label' => 'Slug',
      'rules' => array('trim', 'required', 'unique')
    )
  ); // $validation
  

  public function __construct($id = NULL) {
    parent::__construct($id);
  } // end of method __construct($id = NULL)

} // Class Client_protoweb

/* End of file Client_protoweb.php */
/* Location: ./system/application/models/Client_protoweb.php */